package com.aruba.thymeleaf.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class MyController {

    @RequestMapping("hello")
    public String hello() {
        return "hello";
    }

    @RequestMapping("test")
    public String test(Model model) {
        model.addAttribute("msg","controller msg");
        return "test";
    }

    @RequestMapping("err")
    public String err() {
        int a = 1 / 0;
        return "hello";
    }

}
